package com.cxyd.service.impl;

import com.cxyd.dao.PlcSignalDao;
import com.cxyd.entity.PlcSignalEntity;
import com.cxyd.service.PlcSignalService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlcSignalServiceImpl implements PlcSignalService {
    private final PlcSignalDao signalDao;

    public PlcSignalServiceImpl(PlcSignalDao signalDao) {
        this.signalDao = signalDao;
    }

    @Override
    public List<PlcSignalEntity> getSignalByStatus() {
        return signalDao.selectSignalByStatus();
    }

    @Override
    public void updateSignal(PlcSignalEntity entity) {
        signalDao.updateById(entity);
    }
}
